import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/special_list/work_mode_config_entity.dart';
import 'package:enterprise_v6_app/app/data/common/choice_bean.dart';


WorkModeConfigEntity $WorkModeConfigEntityFromJson(Map<String, dynamic> json) {
  final WorkModeConfigEntity workModeConfigEntity = WorkModeConfigEntity();
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    workModeConfigEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    workModeConfigEntity.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    workModeConfigEntity.createDate = createDate;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    workModeConfigEntity.id = id;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    workModeConfigEntity.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    workModeConfigEntity.updateDate = updateDate;
  }
  final String? workMode = jsonConvert.convert<String>(json['workMode']);
  if (workMode != null) {
    workModeConfigEntity.workMode = workMode;
  }
  final String? workTypeId = jsonConvert.convert<String>(json['workTypeId']);
  if (workTypeId != null) {
    workModeConfigEntity.workTypeId = workTypeId;
  }
  final String? workTypeName = jsonConvert.convert<String>(json['workTypeName']);
  if (workTypeName != null) {
    workModeConfigEntity.workTypeName = workTypeName;
  }
  return workModeConfigEntity;
}

Map<String, dynamic> $WorkModeConfigEntityToJson(WorkModeConfigEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createDate'] = entity.createDate;
  data['id'] = entity.id;
  data['updateBy'] = entity.updateBy;
  data['updateDate'] = entity.updateDate;
  data['workMode'] = entity.workMode;
  data['workTypeId'] = entity.workTypeId;
  data['workTypeName'] = entity.workTypeName;
  return data;
}

extension WorkModeConfigEntityExtension on WorkModeConfigEntity {
  WorkModeConfigEntity copyWith({
    String? companyCode,
    String? createBy,
    String? createDate,
    String? id,
    String? updateBy,
    String? updateDate,
    String? workMode,
    String? workTypeId,
    String? workTypeName,
  }) {
    return WorkModeConfigEntity()
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..id = id ?? this.id
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..workMode = workMode ?? this.workMode
      ..workTypeId = workTypeId ?? this.workTypeId
      ..workTypeName = workTypeName ?? this.workTypeName;
  }
}
